package com.easyOrder.web.action2.order;

import com.easyOrder.core.comm.BaseAction;
import com.easyOrder.service.requisition.RequisitionDetailService;
import com.easyOrder.service.requisition.RequisitionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * Created by liutao on 2017/8/11.
 */
@RestController
@RequestMapping("/complete")
public class CompleteAction extends BaseAction{


    @Autowired
    private RequisitionDetailService requisitionDetailService;

    @Autowired
    private RequisitionService requisitionService;


    /**
     * 完成接单
     */
    @RequestMapping(value = "/orderDetail", method = {RequestMethod.GET, RequestMethod.OPTIONS})
    public Object CompleteOrderDetail(@RequestParam Long detailId,@RequestParam Long requisitionId){
        requisitionService.CompleteOrderDetail(requisitionId,detailId);
        return wrapperJsonView(new Date());
    }




}
